import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    topicDetail:'',
    noReData:'',
    userDetail:''

  },
  mutations: {
    setTopicDetail(state, topicDetail) {  //对首页的操作  
      return state.topicDetail=topicDetail;
  },
    fetchNoReData(state,noReData){  //对无人回复的操作
      sessionStorage.setItem("noReData",JSON.stringify(noReData));
      return state.noReData=noReData;
  },
    setUserDetail(state,userDetail){  //对用户详情的操作
      sessionStorage.setItem("userDetail",JSON.stringify(userDetail));
      return state.userDetail=userDetail;
  }
  },
  actions: {
  },
  modules: {
  }
})
